]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/remote-access: Don't show recording icon for screenshot UI casts
authorIvan Molodetskikh <yalterz@gmail.com>
Wed, 9 Feb 2022 07:00:07 +0000 (10:00 +0300)
committerMarge Bot <marge-bot@gnome.org>
Sat, 12 Feb 2022 14:36:54 +0000 (14:36 +0000)
If there's only a single recording and it is the screenshot UI
recording, don't show the icon, because it's already displayed by the
new panel.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2163>

js/ui/status/remoteAccess.js

index 605ad69c68ae5d604f80fa484da35c864059cada..992215ad3c0a11d4e4383a38f55d3672778723de 100644 (file)
@@ -58,7 +58,15 @@ class RemoteAccessApplet extends PanelMenu.SystemIndicator {
     }
 
     _isRecording() {
-        return [...this._handles].some(handle => handle.is_recording);
+        const recordingHandles =
+            [...this._handles].filter(handle => handle.is_recording);
+
+        // Screenshot UI screencasts have their own panel, so don't show this
+        // indicator if there's only a screenshot UI screencast.
+        if (Main.screenshotUI.screencast_in_progress)
+            return recordingHandles.length > 1;
+
+        return recordingHandles.length > 0;
     }
 
     _sync() {